package com.mz.mattress.client.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mz.mattress.api.entity.OrderUseTimesBonus;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface OrderUseTimesBonusMapper extends BaseMapper<OrderUseTimesBonus> {

    IPage<OrderUseTimesBonus> listPage(Page page,
                                       @Param("months") String months,
                                       @Param("dates") String dates,
                                       @Param("memberId") Long memberId,
                                       @Param("merchantId") Integer merchantId);
    
    @Select("select * from mz_order_use_times_bonus where order_id=#{orderId} and deleted=0")
    List<OrderUseTimesBonus> list(@Param("orderId") Long orderId);

}
